<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <title>切换图书来源</title>
</head>
<body>
<font color="green">${successMsg }</font>
<div>
    <p><a href="/">返回首页</a></p>
    <p>以下是可以切换的源：</p>
</div>
<div class="chapter">
    <form id="beanForm" method="POST" action="">
    </form>
    <table style="display: inline-block">
        <c:forEach items="${sourceList }" var="source">
            <tr style="margin-top: 40px">
                <td>
                    <span>${source.sourceName}</span>
                </td>
                <td>
                    <c:choose>
                        <c:when test="${source.isDefault == 1}">
                            (正在使用)
                        </c:when>
                        <c:otherwise>
                            <input type="button" title="${source.sourceCode}" value="切换" class="webSource"/>
                        </c:otherwise>
                    </c:choose>
                </td>
            </tr>
        </c:forEach>
    </table>
</div>
</body>

<script type="text/javascript" src="${ctx}/static/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="${ctx}/static/js/source.js"></script>
</html>